/*
 * @Author: your name
 * @Date: 2021-02-24 11:21:39
 * @LastEditTime: 2021-02-24 11:35:48
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \mongoShell\goTask.js
 */
var username = "jspang";//声明一个登录名
var timeStamp = Date.parse(new Date());//声明登录的时间戳
var jsonDatabase = {"loginUser":username,"loginTime":timeStamp};//组成json字符串
var db = connect('log');  //链接数据库
db.log.insert(jsonDatabase);//插入数据
print('[demo]log print success');//没有错误显示成功
